<template>
    <div>
    <TopLink></TopLink>
    <MovieData :obj="arra" tit="影院热线"></MovieData>
     <MovieData :obj="arrb" tit="在线观影"></MovieData>
      <MovieData :obj="arrc" tit="新片速递"></MovieData>
    </div>
</template>
<script>
import TopLink from "@/components/toplink/toplink.vue"
import MovieData from "@/components/movieData/movieData.vue"
export default {
    components:{
        TopLink,
        MovieData,
    },
    data() {
        return {
            arr:[]
        }
    },
    mounted() {
        this.axios({
            url:"/api/v2/movie/top250",
            method:"get"
        })
        .then((res)=>{
            // console.log(res)
            this.arr=res.data.subjects
        })
    },
    computed: {
        arra(){
          return  this.arr.slice(0,6);
        },
        arrb(){
          return  this.arr.slice(7,13);
        },
        arrc(){
          return  this.arr.slice(14,20);
        }
    },
}
</script>
<style  scoped>

</style>